package org.minuframework.common;

@Deprecated
public abstract class ServiceImpl<T extends JsonResult>{
    
    public static final int    SUCCESS_CODE        = 200;
    public static final int    ERROE_CODE          = 500;
    public static final String DEFAULT_SUCCECC_STR = "success";
    public static final String DEFAULT_ERROR_STR   = "error";
    
    public abstract T renderError();
    
    public abstract T renderError(int code);
    
    public abstract T renderError(String msg);
    
    public abstract T renderError(int code, String msg);
    
    public abstract T renderSuccess();
    
    public abstract T renderSuccess(Object data);
    
    public abstract T renderSuccess(Object data, long total, int pages);
    
    public abstract T renderSuccess(Object data, long total, int pages, int pageNum, int pageSize);
    
    public abstract T renderSuccess(String msg);
    
    public abstract T renderSuccess(String msg, Object data);
    
    public abstract T renderSuccess(String msg, Object data, long total, int pages);
    
    public abstract T renderSuccess(String msg, Object data, long total, int pages, int pageNum, int pageSize);
    
}
